#!/bin/sh

MATCH="^[[:space:]]*($|;)"

echo "==== Additional PHP 7.0 information ====" >&3
echo "" >&3
echo "++++ PHP @PHP_VERSION SAPI (php7.0query -S): ++++" >&3
/usr/sbin/php7.0query -S >&3
echo "" >&3
echo "++++ PHP 7.0 Extensions (php7.0query -M -v): ++++" >&3
/usr/sbin/php7.0query -M -v >&3
echo "" >&3

echo "++++ Configuration files: ++++" >&3
for dsoname in intl; do
    inifile=${dsoname}.ini
    echo "**** /etc/php/7.0/mods-available/$dsoname.ini ****" >&3
    grep -Ev "$MATCH" "/etc/php/7.0/mods-available/$dsoname.ini" >&3
    echo "" >&3
done
